<?php
/**
 * Created by PhpStorm.
 * User: lyh
 * Date: 2016/9/15
 * Time: 9:44
 */

namespace Article\Model;
use Think\Model\RelationModel;
class ArticleRelationModel extends RelationModel{
    Protected $tableName='article';
    Protected $_link=array(
        'comment'=>array(
            'mapping_type'=>self::MANY_TO_MANY,
            'foreign_key'=>'aid',
            'relation_foreign_key'=>'cid',
            'relation_table'=>'hd_article_comment',
        ),
    );
}